﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace 只读字段
{
    internal class Program
    {
        static void Main(string[] args)
        {
            Console.WriteLine(DocumentEditor.s_maxDocuments);

            //   DocumentEditor.s_maxDocuments = 10;
            //CS0198	无法对静态只读字段赋值(静态构造函数或变量初始值中除外)


            Console.WriteLine("--------------------");
            Document bb = new Document();
            Console.WriteLine(bb._creationTime);
            //只读字段是通过实例来读取的，常量通过类属性来读取

            Console.ReadLine();
        }
    }
}
